﻿Public Class FotosSlide
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        encheGrid()
    End Sub

    Public Sub encheGrid()
        Dim strMap As String = Server.MapPath("../imgs")
        Dim diretorio As New System.IO.DirectoryInfo(strMap)
        Me.GridView1.DataSource = diretorio.GetFiles
        Me.GridView1.DataBind()

        Me.DataList1.DataSource = diretorio.GetFiles
        Me.DataList1.DataBind()
    End Sub


    Private Sub DataList1_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataListItemEventArgs) Handles DataList1.ItemDataBound

        'Dim label1 As Label = e.Item.FindControl("label1")
        Dim HyperLink1 As HyperLink = e.Item.FindControl("HyperLink1")
        HyperLink1.NavigateUrl = "../imgs/" & HyperLink1.Text


    End Sub
End Class